/**
 * @program: 11.19 02
 * @description:
 * @author: 李鑫月
 * @create: 2021-11-21 19:13
 **/
class A {
    String name;

}
class B extends A{
    int age;
}
class C extends B{
    int sex;
}
class X{
    Y y=new Y();
    public X(){
        System.out.print("X");
    }
}
class Y{
    public Y(){
        System.out.print("Y");
    }
}
 class Z extends X{
    Y y=new Y();
    public Z(){
        System.out.print("Z");
    }
    public static void main(String[] args) {
        new Z();
    }
}
public class demo01 {
    public static void main1(String[] args) {
        A a3=new C();
        System.out.println(a3.name);
    }
}
